Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global release switch, tag prefix #37

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

backuitist
Copy link

Let the user decide whether the release should be global or local by setting the globalRelease setting.

Let's say we have a project with the following modules:

  • core
  • lib-A
  • lib-B
  • client
  • server

You might want to release core, lib-A and lib-B at once but client and server independently.
Currently the release plugin set the version to the version.sbt file at the root of the project, in the ThisBuild scope. Therefore your only option is to create 3 independent SBT projects.

With these changes you can have a per-module release process.

For instance in server the release process could be defined this way:

Project("server").
      settings(
          ReleasePlugin.releaseSettings : _*).
      settings(
          globalRelease := false,
          tagPrefix := "server-",

          // server specific settings used by the bundle, upload and restartServer steps
          bundleTarget <<= target(_ / "dist"),
          bundleFile <<= (bundleTarget,name,version){(t,n,v) => t / (n + "-" + v + ".tar")},
          serverUri := "[email protected]",
          serverTarget := "~/server/versions/",

          releaseProcess := Seq[ReleaseStep](
            checkSnapshotDependencies,
            inquireVersions,
            runTest,
            setReleaseVersion,
            commitReleaseVersion,
            tagRelease,

            // publishArtifacts, // don't care

            bundle,
            upload,
            restartServer,

            setNextVersion,
            commitNextVersion,
            pushChanges
          )).

@ebowman
Copy link
Contributor

ebowman commented May 30, 2013

Love this! Thanks!

@backuitist
Copy link
Author

Thanks @ebowman, any idea if this is being considered?

@laughedelic
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants